/*
 * CAN.h
 *
 * Created: 04.10.2012 11:34:54
 *  Author: bardbakk
 */ 


#ifndef CAN_H_
#define CAN_H_

#include <stdint.h>

typedef struct{
	unsigned int id;
	uint8_t length;
	uint8_t data[8];
} CAN_message_t;

void CAN_init();
void CAN_message_send(CAN_message_t msg);
char* CAN_error();
uint8_t CAN_transmit_complete();
CAN_message_t* CAN_message_receive(uint8_t bufID);
void CAN_int_vect();


#endif /* CAN_H_ */